package com.dkd.manage.task.allocator.model;

import lombok.Data;

@Data
public class AlgorithmWeights {
    private double geneticWeight = 0.15;
    private double psoWeight = 0.15;
    private double nnWeight = 0.25;
    private double fuzzyWeight = 0.15;
    private double antWeight = 0.15;
    private double saWeight = 0.15;

    public AlgorithmWeights calculateDynamicWeights(String taskType) {
        // 基于任务类型调整权重
        switch (taskType) {
            case "URGENT":
                nnWeight = 0.35;  // 神经网络权重更高
                geneticWeight = 0.10;
                break;
            case "COMPLEX":
                fuzzyWeight = 0.25;  // 模糊逻辑更适合复杂任务
                break;
            default:
                // 保持默认权重
        }
        return this;
    }
}